<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>{$TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.code {
	color: #333;
	background:white;
	font-family: monospace, 'courier new', courier;
	padding: 10px;
	margin: 10px 0px;
	border:1px solid gray;
} 
</style>
</head>
<body>
<div>

<h1>{$TITLE}</h1>
{$list}
				
<a name="tags" /><h2>Template tags</h2>
{literal}

<a name="if" /><h3>{if}</h3>
Examples:
<pre>{if $item[sub_list] neq ''}{/if}
{if $object.a eq true}{/if}
{if $var lt 9}{/if}
{if $object.get_b gt 2}{/if}
</pre>
Comparison Operators supported:
<pre>eq - equal sinonim for PHP ==
neq - not equal sinonim for PHP !=
lt - less than sinonim for PHP &lt;
gt - greated than sinonim for PHP &gt;
</pre>

<a name="foreach" /><h3>{foreach}</h3>
Examples:
<pre>{foreach item = $item from = $list}&lt;span&gt;{$item}&lt;/span&gt;{/foreach}
{foreach item = $object from = $list}
	&lt;a href=&quot;{$object.href}&quot;&gt;{$object.title}&lt;/a&gt;
{/foreach}
</pre>

<a name="literal" /><h3>{literal}</h3>
Text inside this tag is not parsed.
		
<a name="include" /><h3>{include}</h3>
Examples:<br/>
Include template file and don't parse it.
<pre>{include file = 'test.tpl'}</pre>
Include template file and parse it.
<pre>{include file = 'list.tpl' parse}</pre>
Include template file and parse it with variable passthrough.
<pre>{include file = 'list.tpl' parse list = $item[sub_list]}</pre>
Include url.
<pre>{include url = 'http://test.com'}</pre>

<a name="variable" /><h3>{$variable}</h3>
{/literal}

Varibale call
<pre>{literal}{$TITLE}{/literal}: {$TITLE}</pre>
Constant call
<pre>{literal}{$HOST}{/literal}: {$HOST}</pre>
List item call
<pre>{literal}{$test_list[title]}{/literal}: {$test_list[title]}</pre>
Object property call
<pre>{literal}{$object.a}{/literal}: {$object.a}</pre>
Object method call
<pre>{literal}{$object.get_a}{/literal}: {$object.get_a}</pre>
		
<a name="demo_source" /><h2>Demo source code:</h2>
<div class="code"><pre>{$source}</pre></div>

<a name="list_template" /><h2>List template source code:</h2>
<div class="code"><pre>{$list_template_source}</pre></div>

</div>
</body>
</html>